﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfServiceLibrary1
{
    public class Service1 : IService1
    {
        public string GetData(int value, ref string strRef, out string strOut)
        {
            System.Threading.Thread.Sleep(5000);// stop 10 seconds
            strRef += "---changed by WCF method";
            strOut = "from WCF method";
            return string.Format("You entered: {0}", value + strRef + strOut);
        }

        public CompositeType GetDataUsingDataContract(CompositeType composite)
        {
            if (composite == null)
            {
                throw new ArgumentNullException("composite");
            }

            if (composite.BoolValue)
            {
                composite.StringValue = string.Concat(composite.StringValue, " Suffix");
            }

            return composite;
        }

        public void TestSingleMsgModel(string strInput)
        {
            System.Threading.Thread.Sleep(10000);
        }
    }
}
